package com.neusoft.hellospringboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * 
 * @author hp
 *
 */
@RestController
public class HelloController {
	/**
	 * 
	 * @param name
	 * @return
	 */
	@RequestMapping("/name")
	
	public String hello(@RequestParam(defaultValue="aa",value="name")String name) {
		return "hellossdad:"+name;
	}
	@RequestMapping("/showme")
	
	public ModelAndView show() {
		ModelAndView view=new ModelAndView("show");
		view.addObject("name","我来自thymeleaf");
		return view;
	}
}
